﻿using System.Reflection;
using System.Web.Mvc;

namespace Net.Web.Framework.UI
{
    /// <summary>
    /// 页面头部构造接口
    /// </summary>
    public partial interface IPageHeadBuilder
    {
        /// <summary>
        /// 设置Ttile
        /// </summary>
        /// <param name="part"></param>
        void AddTitleParts(string part);

        /// <summary>
        /// 追加Title内容
        /// </summary>
        /// <param name="part"></param>
        void AppendTitleParts(string part);

        /// <summary>
        /// 生成Title
        /// </summary>
        /// <param name="addDefaultTitle"></param>
        /// <returns></returns>
        string GenerateTitle(bool addDefaultTitle);

        /// <summary>
        /// 增加MetaDescription内容 
        /// </summary>
        /// <param name="part"></param>
        void AddMetaDescriptionParts(string part);

        /// <summary>
        /// 追加MetaDescription内容
        /// </summary>
        /// <param name="part"></param>
        void AppendMetaDescriptionParts(string part);
        string GenerateMetaDescription();
        /// <summary>
        /// 生成MetaKeyword
        /// </summary>
        /// <param name="part"></param>
        void AddMetaKeywordParts(string part);
        /// <summary>
        /// 追加MetaKeyword
        /// </summary>
        /// <param name="part"></param>
        void AppendMetaKeywordParts(string part);
        /// <summary>
        /// 生成MetaKeyword内容
        /// </summary>
        /// <returns></returns>
        string GenerateMetaKeywords();

        /// <summary>
        /// 增加脚本内容
        /// </summary>
        /// <param name="location"></param>
        /// <param name="part"></param>
        /// <param name="excludeFromBundle"></param>
        void AddScriptParts(ResourceLocation location, string part, bool excludeFromBundle);
        /// <summary>
        /// 追加脚本内容
        /// </summary>
        /// <param name="location"></param>
        /// <param name="part"></param>
        /// <param name="excludeFromBundle"></param>
        void AppendScriptParts(ResourceLocation location, string part, bool excludeFromBundle);
        /// <summary>
        /// 生成脚本内容
        /// </summary>
        /// <param name="urlHelper"></param>
        /// <param name="location"></param>
        /// <param name="bundleFiles"></param>
        /// <returns></returns>
        string GenerateScripts(UrlHelper urlHelper, ResourceLocation location, bool? bundleFiles = null);
        /// <summary>
        /// 增加样式文件内容
        /// </summary>
        /// <param name="location"></param>
        /// <param name="part"></param>
        void AddCssFileParts(ResourceLocation location, string part);
        /// <summary>
        /// 追加样式文件内容
        /// </summary>
        /// <param name="location"></param>
        /// <param name="part"></param>
        void AppendCssFileParts(ResourceLocation location, string part);
        /// <summary>
        /// 生成样式文件内容
        /// </summary>
        /// <param name="urlHelper"></param>
        /// <param name="location"></param>
        /// <param name="bundleFiles"></param>
        /// <returns></returns>
        string GenerateCssFiles(UrlHelper urlHelper, ResourceLocation location, bool? bundleFiles = null);

    }
}
